package com.jbm.onehome.iface;

import com.jbm.core.iface.IAcross;

import javax.persistence.*;
import java.sql.Timestamp;

/**
 * Created by lyh on 2017-03-06.
 */
@Entity
@Table(name = "cert_address", schema = "", catalog = "jbmcore")
@org.hibernate.annotations.Entity(dynamicUpdate=true,dynamicInsert=true)
public class CertAddressEntity extends IAcross
{
    private static final long serialVersionUID = -1879429092563762771L;
    @Transient
    public boolean back;
    @Transient
    public String method;
    @Transient
    public String errorinfo;
    @Transient
    public int count;
    @Transient
    public int start=0;
    @Transient
    public int pagesize=0;
    @Transient
    public Integer tableid;
    private int caddrId;
    private int memberId;
    private int giId;
    private String giAddon;
    private String giText;
    private String zipCode;
    private String contacts;
    private String mobile;
    private String phone;
    private String certStatus;
    private Timestamp certDate;
    private Integer certId;
    private Integer defStatus;
    private Timestamp createDate;
    private int createId;
    private Timestamp expireDate;
    private Timestamp closeDate;
    private Integer closeId;
    private String giType;

	public CertAddressEntity()
	{
		super();
	}

	public CertAddressEntity(IAcross ia)
	{
		super(ia);
	}

    @Id
    @Column(name = "caddr_id")
    @GeneratedValue
    public int getCaddrId() {
        return caddrId;
    }

    public void setCaddrId(int caddrId) {
        this.caddrId = caddrId;
    }

    @Basic
    @Column(name = "member_id")
    public int getMemberId() {
        return memberId;
    }

    public void setMemberId(int memberId) {
        this.memberId = memberId;
    }

    @Basic
    @Column(name = "gi_id")
    public int getGiId() {
        return giId;
    }

    public void setGiId(int giId) {
        this.giId = giId;
    }

    @Basic
    @Column(name = "gi_addon")
    public String getGiAddon() {
        return giAddon;
    }

    public void setGiAddon(String giAddon) {
        this.giAddon = giAddon;
    }

    @Basic
    @Column(name = "gi_text")
    public String getGiText() {
        return giText;
    }

    public void setGiText(String giText) {
        this.giText = giText;
    }

    @Basic
    @Column(name = "zip_code")
    public String getZipCode() {
        return zipCode;
    }

    public void setZipCode(String zipCode) {
        this.zipCode = zipCode;
    }

    @Basic
    @Column(name = "contacts")
    public String getContacts() {
        return contacts;
    }

    public void setContacts(String contacts) {
        this.contacts = contacts;
    }

    @Basic
    @Column(name = "mobile")
    public String getMobile() {
        return mobile;
    }

    public void setMobile(String mobile) {
        this.mobile = mobile;
    }

    @Basic
    @Column(name = "phone")
    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    @Basic
    @Column(name = "cert_status")
    public String getCertStatus() {
        return certStatus;
    }

    public void setCertStatus(String certStatus) {
        this.certStatus = certStatus;
    }

    @Basic
    @Column(name = "cert_date")
    public Timestamp getCertDate() {
        return certDate;
    }

    public void setCertDate(Timestamp certDate) {
        this.certDate = certDate;
    }

    @Basic
    @Column(name = "cert_id")
    public Integer getCertId() {
        return certId;
    }

    public void setCertId(Integer certId) {
        this.certId = certId;
    }

    @Basic
    @Column(name = "def_status")
    public Integer getDefStatus() {
        return defStatus;
    }

    public void setDefStatus(Integer defStatus) {
        this.defStatus = defStatus;
    }

    @Basic
    @Column(name = "create_date")
    public Timestamp getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Timestamp createDate) {
        this.createDate = createDate;
    }

    @Basic
    @Column(name = "create_id")
    public int getCreateId() {
        return createId;
    }

    public void setCreateId(int createId) {
        this.createId = createId;
    }

    @Basic
    @Column(name = "expire_date")
    public Timestamp getExpireDate() {
        return expireDate;
    }

    public void setExpireDate(Timestamp expireDate) {
        this.expireDate = expireDate;
    }

    @Basic
    @Column(name = "close_date")
    public Timestamp getCloseDate() {
        return closeDate;
    }

    public void setCloseDate(Timestamp closeDate) {
        this.closeDate = closeDate;
    }

    @Basic
    @Column(name = "close_id")
    public Integer getCloseId() {
        return closeId;
    }

    public void setCloseId(Integer closeId) {
        this.closeId = closeId;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        CertAddressEntity that = (CertAddressEntity) o;

        if (caddrId != that.caddrId) return false;
        if (createId != that.createId) return false;
        if (giId != that.giId) return false;
        if (memberId != that.memberId) return false;
        if (certDate != null ? !certDate.equals(that.certDate) : that.certDate != null) return false;
        if (certId != null ? !certId.equals(that.certId) : that.certId != null) return false;
        if (certStatus != null ? !certStatus.equals(that.certStatus) : that.certStatus != null) return false;
        if (closeDate != null ? !closeDate.equals(that.closeDate) : that.closeDate != null) return false;
        if (closeId != null ? !closeId.equals(that.closeId) : that.closeId != null) return false;
        if (contacts != null ? !contacts.equals(that.contacts) : that.contacts != null) return false;
        if (createDate != null ? !createDate.equals(that.createDate) : that.createDate != null) return false;
        if (defStatus != null ? !defStatus.equals(that.defStatus) : that.defStatus != null) return false;
        if (expireDate != null ? !expireDate.equals(that.expireDate) : that.expireDate != null) return false;
        if (giAddon != null ? !giAddon.equals(that.giAddon) : that.giAddon != null) return false;
        if (giText != null ? !giText.equals(that.giText) : that.giText != null) return false;
        if (mobile != null ? !mobile.equals(that.mobile) : that.mobile != null) return false;
        if (phone != null ? !phone.equals(that.phone) : that.phone != null) return false;
        if (zipCode != null ? !zipCode.equals(that.zipCode) : that.zipCode != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = caddrId;
        result = 31 * result + memberId;
        result = 31 * result + giId;
        result = 31 * result + (giAddon != null ? giAddon.hashCode() : 0);
        result = 31 * result + (giText != null ? giText.hashCode() : 0);
        result = 31 * result + (zipCode != null ? zipCode.hashCode() : 0);
        result = 31 * result + (contacts != null ? contacts.hashCode() : 0);
        result = 31 * result + (mobile != null ? mobile.hashCode() : 0);
        result = 31 * result + (phone != null ? phone.hashCode() : 0);
        result = 31 * result + (certStatus != null ? certStatus.hashCode() : 0);
        result = 31 * result + (certDate != null ? certDate.hashCode() : 0);
        result = 31 * result + (certId != null ? certId.hashCode() : 0);
        result = 31 * result + (defStatus != null ? defStatus.hashCode() : 0);
        result = 31 * result + (createDate != null ? createDate.hashCode() : 0);
        result = 31 * result + createId;
        result = 31 * result + (expireDate != null ? expireDate.hashCode() : 0);
        result = 31 * result + (closeDate != null ? closeDate.hashCode() : 0);
        result = 31 * result + (closeId != null ? closeId.hashCode() : 0);
        return result;
    }

    @Basic
    @Column(name = "gi_type")
    public String getGiType() {
        return giType;
    }

    public void setGiType(String giType) {
        this.giType = giType;
    }
}
